MDEV-37842 Skip implicit Using_Gtid warning when value is unchanged#4678
MDEV-37842 Skip implicit Using_Gtid warning when value is unchanged#4678bodyhedia44 wants to merge 1 commit intoMariaDB:10.11from
Conversation
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution. This is a preliminary review. Please add tests to cover the change. You seem to have a pretty clear path to reproduce. Just add that into a .test file.
|
Done, I added the tests |
gkodinov
left a comment
There was a problem hiding this comment.
Perfect. Ticking my box. Stand by for the final review.
Please don't have multiple commits. Always squash your commits to a single one and update the commit message in the process.
gkodinov
left a comment
There was a problem hiding this comment.
Please re-record rpl.rpl_from_mysql80: it's failing because of your changes.
8fa5b20 to
f1cb337
Compare
|
Done |
gkodinov
left a comment
There was a problem hiding this comment.
LGTM. Thanks for working on this!
Stand by for the final review please.
bnestere
left a comment
There was a problem hiding this comment.
Looks good to me as well, thank you @bodyhedia44 !
One last request before merging would be to add the following to the end of your git commit message:
Reviewed-by: Georgi Kodinov <joro@mariadb.org>
Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
When a replica already has Using_Gtid=No and a CHANGE MASTER TO is issued with log coordinates (e.g. relay_log_pos, master_log_file), the server emits a spurious warning: Note 4190 CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'No' to 'No' The value isn't actually changing, so the warning is misleading. In change_master() (sql/sql_repl.cc), when log coordinates are specified without an explicit master_use_gtid, the code implicitly sets Using_Gtid to No and emits a warning. The condition only checks whether master_use_gtid=No was explicitly given but does not check whether Using_Gtid is already No. Added a check that the current Using_Gtid value differs from USE_GTID_NO before emitting the warning. The warning now only fires when the value actually changes. Re-recorded rpl.rpl_from_mysql80 which previously expected the spurious No-to-No warning. Reviewed-by: Georgi Kodinov <joro@mariadb.org> Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com> MariaDB#4678
f1cb337 to
3947658
Compare
Done |
bnestere
left a comment
There was a problem hiding this comment.
Looks good, thank you @bodyhedia44 !
MDEV-37842 Skip implicit Using_Gtid warning when value is unchanged
Description
When a replica already has
Using_Gtid=Noand aCHANGE MASTER TOis issued with log coordinates (e.g.relay_log_pos,master_log_file), the server emits a spurious warning:Note 4190: CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'No' to 'No'
The value isn't actually changing, so the warning is misleading.
Root Cause
In
change_master()(sql/sql_repl.cc), when log coordinates are specified without an explicitmaster_use_gtid, the code implicitly setsUsing_GtidtoNoand emits a warning. The condition only checks whethermaster_use_gtid=Nowas explicitly given — it does not check whetherUsing_Gtidis alreadyNo. This causes the "from No to No" warning.Fix
Added a check that the current
Using_Gtidvalue differs fromUSE_GTID_NObefore emitting the warning. The warning now only fires when the value actually changes.How to test
Start a MariaDB 10.11+ server and connect as a client:
Expected: Note 4190: CHANGE MASTER TO is implicitly changing the value of 'Using_Gtid' from 'Slave_Pos' to 'No'